<template>
  <div class="detail">
    <div class="box">
      <div class="wrapper">
        <h1>{{ info.name }}</h1>
        <div class="info">招标状态：<el-link :type="info.tenderStatus === '1' ? 'primary' : 'info'" :underline="false">{{ info.tenderStatus === '1' ? '招标公告' : '招标结果' }}</el-link> <span>公布时间：{{ new Date(info.createDate) | getDate }}</span></div>
      </div>
    </div>
    <el-divider />
    <div class="box">
      <div class="wrapper">
        <div class="tender-body">
          <div v-html="info.content" />
          <el-divider />
          <div class="tips">
            <h6>友情提示：</h6>
            <p>为保证您能够顺利投标，请在投标或购买招标文件前向招标代理机构或者招标人资讯投标详细要求，具体要求及项目情况以招标代理机构或招标人的解释为准</p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'TenderDetail',
  data() {
    return {
      id: this.$route.params.id,
      info: {}
    };
  },
  mounted() {
    this.info = JSON.parse(this.$route.query.res);
  }
};
</script>

<style lang="scss" scoped>
.detail{
  font-size: $fontSizeBase;
  color: $textColorDark;
  background-color: #fff;
  padding: 30px 0 40px;
  p,h1,h2,h3,h4,h5,h6,ul,li,ol{
    margin: 0;
    padding: 0;
  }
  h1{
    font-size: $fontSizeXXBig;
  }
  h6{
    color: #F56A6D;
    font-size: $fontSizeBase;
    line-height: 2;
  }
  .info{
    color: $textColorBase;
    margin-top: 8px;
    span{
      padding-left: 50px;
    }
  }
  .tips{
    background-color: #F6F8F9;
    padding: 12px;
    line-height: 1.5;
    color: #666;
    font-size: $fontSizeSm;
  }
  .box{
    display: flex;
    justify-content: center;
  }
  .wrapper{
    width: 900px;
  }
}
</style>
